//app.js
App({
  onLaunch: function () {
    this.getSections()
    console.log(this.globalData.sections)
  },
  //全局的数据
  globalData: {
    sections: [
      { 
        name:"立论阶段",
        uprightshowText:"(一)正方一辩开篇立论",
        againstshowText:"(二)正方一辩开篇立论",
        totalTime:180,
        alertTime:15
      },
      {
        name: "驳立论阶段",
        uprightshowText: "(一)正方一辩开篇立论",
        againstshowText: "(二)正方一辩开篇立论",
        totalTime: 180,
        alertTime: 15
       }, 
      { 
        name: "质辩环节",
        uprightshowText: "(一)正方一辩开篇立论",
        againstshowText: "(二)正方一辩开篇立论",
        totalTime: 180,
        alertTime: 15
      }, 
      {
        name: "自由辩论",
        uprightshowText: "(一)正方一辩开篇立论",
        againstshowText: "(二)正方一辩开篇立论",
        totalTime: 180,
        alertTime: 15
      }, 
      {
        name: "总结陈词",
        uprightshowText: "(一)正方一辩开篇立论",
        againstshowText: "(二)正方一辩开篇立论",
         totalTime: 180,
         alertTime: 15
      }
    ]
  },
  saveSections:function(){
    var self = this
    wx.setStorage({
      key: 'secions',
      data: self.globalData.sections,
    })
  },
  getSections:function(){
    var self = this
    wx.getStorage({
      key: 'secions',
      success: function(res) {
        if (res != null){
          self.globalData.sections = res.data
        }
      },
    })
  }


})